<%@page import="org.ddr.board.BoardVO"%>
<%@page import="org.ddr.board.dao.BbsDAO"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String bbsno = request.getParameter("bbsno");
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">

.content_table {width:800}
.content_table td { text-align: center;  border-bottom: 1px solid #e5e5e5; padding: 5px; 
font-size:10pt;}
 </style>
</head>
<body>

<% 
	List<BoardVO> list = new ArrayList<BoardVO>();
	list = BbsDAO.instance.find(Integer.parseInt(bbsno));
%>
<table class = "content-table">
		<tr>
			<td bgcolor = "#e0fff" align = "left">제목 : </td> 
	       	<td><%=list.get(0).getTitle() %></td>
		</tr>
	    <tr>
			<td bgcolor = "#e0fff" align = "left">내용 : </td> 
		    <td><%=list.get(0).getContents() %></td>
		</tr>
		<tr>
			<td>
				<form name = "form1" action = "inputreply.jsp" method="post">
					<input type = "hidden" name = "gno" value = "<%=list.get(0).getgNo() %>">
					<input type = "hidden" name = "gord" value = "<%=list.get(0).getgOrd() %>">
					<input type = "hidden" name = "pno" value = "<%=list.get(0).getBbsNo() %>">
					<input type = "hidden" name = "depth" value = "<%=list.get(0).getDepth()%>">
					<input type ="submit" value="답글달기">
				</form>
			</td>
		</tr>
</table>
<table>
	<tr>
		<td>
			<form name = "form1" action = "replyresult.jsp" method="post">
	 			<input type = "hidden" name = "userId" value = "<%=(String)session.getAttribute("Login") %>">
				<input type = "hidden" name = "bbsno" value = "<%=list.get(0).getBbsNo() %>">
				<input type ="textarea" name ="content" size="100">
				<input type ="submit" value="덧글입력">
			</form>
		</td>
	</tr>
</table>
<table>
	<tr>
		<iframe src="replyLayout.jsp?bbsno=<%=list.get(0).getBbsNo() %>"
		width="750" height="500" frameborder="0" scrolling="no" marginwidth="0" marginheight="0"
		></iframe>
	</tr>
</table>
</body>
</html>